package geneComponent;

import java.util.List;

import base.Parameter;

public class Sqrt extends Function {
	
	public Sqrt(Parameter parameters){
    	super(parameters);
    	setName("√");
    }

    @Override
    public void calc(List<Double> results) {
		//실제 연산
		
    	if (results.size() == 1) {
			results.set(0, results.get(0));
		}
    	
    	while(1 < results .size()) {
			results.set(0, Math.sqrt(results.get(0)));
		}
    }
}

